import request from '@/utils/request'

export default {
    //1.演员列表，带条件查询和分页的
    getActorListPage(actorQuery) {
        return request({
            url: `/api/admin/actors/actors/${actorQuery.pageNum}/${actorQuery.pageSize}`,
            method: 'post',
            data: actorQuery
        })
    },
    //2.删除演员
    deleteActorById(id) {
        return request({
            url: `/api/admin/actors/actor/${id}`,
            method: 'delete'
        })
    },
    //3.添加演员
    addActor(params) {
        return request({
            url: `/api/admin/actors/actor`,
            method: 'post',
            data: params
        })
    },
    //4.根据ID查询演员
    getActorById(id){
        return request({
            url:`/api/admin/actors/actor/${id}`,
            method:'get'
        })
    },
    //5.修改演员信息
    updateActor(params){
        return request({
            url:`api/admin/actors/actor`,
            method:'put',
            data:params
        })

    },
    //6.查询所有演员列表
    getAllActors(){
        return request({
            url:`/api/admin/actors/actors`
        })
    }


}
